
<div class="page">
    <div class="container">
        <div class="span10 offset1" style="margin-top:20px;" id="wrap">

<h4>LOG TRANSAKSI</h4>
<?php if($output['success']=="true"){ ?>

Saldo Anda: <strong><?php echo $output['saldo'];?> </strong><br/>

                      <table class="table table-striped">
                        <thead style="background-color:#FA9932; color:black;">
                            <tr>
                                <th>No</th>
                                <th>Tanggal</th>
                                <th>Uraian</th>
                                <th>Poin</th>
                            </tr>
                        </thead>    
                        <tbody>
                        <?php 
                        for($count=0;$count<sizeof($output['log']);$count++){ ?>  
                        <tr>
                                <td><?php echo $count+1; ?></td>
                                <td><?php echo $output['log'][$count]['timeStamp']; ?> </td>
                                <td>
                                  <?php 
                                  $sql = "select * from transaction where id = ?";
                                  $query = $this->db->query($sql,$output['log'][$count]['transaction_id']);
                                  $row = $query->row();
                                  $dari = $row->source_label;
                                  $ke = $row->destination_label;
                                  ?>
                                  Nebeng dengan <?php echo $output['log'][$count]['providerName'] ?> 
                                  <br/>
                                  <strong><?php echo $dari; ?> -> <?php echo $ke; ?></strong>
                                </td>
                                <td>-<?php echo $output['log'][$count]['priceInPoint']; ?> </td>
                        </tr>
                 <?php   } ?> 
                    <!-- //echo $this->table->generate(); -->
                </tbody>
            </table>
<?php } else { echo 'Anda belum pernah melakukan transaksi<br/>'; } ?>
</div>
</div>
</div>
